package com.demo.user;

import java.util.List;

import org.nature.framework.annotation.Inject;
import org.nature.framework.annotation.QuartzJob;
import org.nature.framework.annotation.Schedule;
import org.nature.framework.core.NatureMap;
/**
 *时间调度简单示例
 */
//@QuartzJob
public class UserQuartzJob {
	
	@Inject
	UserService userService;
	
	@Schedule(corn="0/10 * * * * ?")
	public void report(){
		List<NatureMap> list = userService.list("select name from tb_user","userlist");
		System.out.println("report>>UserService>>list:"+list.get(0));
	}
	
	@Schedule(corn="0/2 * * * * ?")
	public void report2(){
		List<NatureMap> list = userService.list("select age from tb_user","userlist");
		System.out.println("report2>>UserService>>list:"+list.get(0));
	}
	
}
